package com.showcai.service;

import com.github.pagehelper.PageInfo;
import com.showcai.module.Advert;
import com.showcai.module.AdvertLocation;
import com.showcai.myRunTime.MyRunTimeExcption;

import java.util.List;
import java.util.Map;

/**
 * 广告接口
 * Created by Baggio on 2018-9-5.
 */
public interface AdvertService {

    /**
     * 获取广告
     * @param tid 广告ID
     * @return
     * @throws MyRunTimeExcption
     */
    Advert getAdvertById(Long tid) throws MyRunTimeExcption;

    /**
     * 获取广告列表
     * @param locationId 广告显示区域ID
     * @return
     * @throws MyRunTimeExcption
     */
    List<Advert> getAdvertBylocationId(Long locationId)throws MyRunTimeExcption;

    /**
     * 更新广告
     * @param advert
     * @throws MyRunTimeExcption
     */
    void modifyAdvert(Advert advert)throws MyRunTimeExcption;

    /**
     * 获取全部广告
     * @param map
     * @return
     * @throws MyRunTimeExcption
     */
    PageInfo getAdvertList(Map<String,String> map)throws MyRunTimeExcption;
    void stopAdvert(Long tid)throws MyRunTimeExcption;
    void operateAdvert(Long tid)throws MyRunTimeExcption;


    List<AdvertLocation> selectAdvertLocationList(Map<String,String> map)throws MyRunTimeExcption;
}
